package controller;

import java.awt.Graphics;
import javax.swing.JPanel;
import view.GUI.turtle.Turtle;

/**
 *
 * @author Ben
 */
public class StdDraw{

    private JPanel panel;
    private Turtle turtle;
    private volatile static StdDraw  instance = new StdDraw();

    public static StdDraw getInstance() {
        return instance;
    }

    private StdDraw(){
        turtle = new Turtle();
    }

     public void setPanel(JPanel panel){
        this.panel=panel;
    }

    public JPanel getPanel(){
        return panel;
    }

    public Turtle getTurtle(){
        return turtle;
    }

     public Graphics getGraphics(){
        return panel.getGraphics();
     }
}
